<template>
	<view class="container">
	
	</view>
</template>

<script>
import { User } from '@/utils/user.js';
import { LoginType, Toast } from '@/utils/common.js';
import { Plat, APPID, SECRET } from '@/utils/config.js';
import { Request } from '@/utils/request.js';
import WXBizDataCrypt from '@/utils/WXBizDataCrypt.js';

export default {
	data() {
		return {
			title: '首页',
			txt: '进行识别',
			isLogin: false,
			src: 'https://cdn.uviewui.com/uview/album/1.jpg',
		};
	},
	onLoad() {
		console.log('用户是否登录？？?', User.isLogin());
		this.isLogin = User.isLogin();
		if(!this.isLogin){
			//跳转到登录页面
			uni.navigateTo({
				url:"/pages/login/index"
			})
		}
		console.log(`${this.title}已加载!!!`);
		User.location();
	},
	methods: {
	
		showList(){
			console.log("显示选项");
			//this.showActionSheet = true;
			uni.showActionSheet({
				itemList: ['从相册选择', '拍照'],
				success: function (res) {
					console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
				},
				fail: function (res) {
					console.log(res.errMsg);
				}
			});
		},
		closeList(){
			this.showActionSheet = false;
		},
	}
};
</script>

<style>
.content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.text-area {
	display: flex;
	justify-content: center;
}

.container {
	margin: 20px 20px 20px 20px;
}
</style>
